// 输出数列 1, 2, 3, 5, 8, 13, ... 的第 n 项（F1=1, F2=2, Fn=Fn-1+Fn-2）
#include <stdio.h>

int main(void)
{
    int n;
    if (scanf("%d", &n) != 1) {
        return 0;
    }
    if (n <= 0) {
        // 题设要求正整数 n
        return 0;
    }

    if (n == 1) { printf("1"); return 0; }
    if (n == 2) { printf("2"); return 0; }

    unsigned long long a = 1ULL, b = 2ULL;
    for (int i = 3; i <= n; ++i) {
        unsigned long long c = a + b;
        a = b;
        b = c;
    }
    printf("%llu", b);
    return 0;
}